﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ws_appPrivada/msContenido.Master" AutoEventWireup="true" CodeBehind="wInformBasica.aspx.cs" Inherits="SRPCENTRIA.ws_appPrivada.wInformBasica" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript">
    function mostrardiv() {

        div = document.getElementById('divespera');
        div.style.display = '';
        document.getElementById('divbotones').style.visibility = "hidden";

    }
</script>

    <style type="text/css">
        .style1
        {
            width: 153px;
        }
    .style2
    {
        width: 101px;
    }
    </style>

    </asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="../Scripts/ValidacionesPagina.js" type="text/javascript"></script>
<form id="frmLista" name ="frmLista" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">
 <ContentTemplate>--%>
  <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" >
        <tr>
        <td align="center">
        <ul id="lnavegacion" class="navegacion" > 
           <li><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/nhbasica.png" Width="100px" onclick="ImageButton1_Click" /></li>
<%--           <li><a href="wInformBasica.aspx">Basica</a></li>
           <li><a href="wInformBasica.aspx">Dirección</a></li>
           <li><a href="wInformBasica.aspx">Comercial</a></li>
           <li><a href="wInformBasica.aspx">Personas</a></li>
           <li><a href="wInformBasica.aspx">Financiera</a></li>
           <li><a href="wInformBasica.aspx">Tributaria</a></li>--%>
           <li><asp:ImageButton ID="ImageButton2" runat="server" 
                   ImageUrl="~/images/ndireccion.png" Width="100px" onclick="ImageButton2_Click" /></li>
           <li><asp:ImageButton ID="ImageButton3" runat="server" 
                   ImageUrl="~/images/ncomercial.png" Width="100px" onclick="ImageButton3_Click" /></li>
           <li><asp:ImageButton ID="ImageButton4" runat="server" 
                   ImageUrl="~/images/npersonas.png" Width="100px" onclick="ImageButton4_Click" /></li>
           <li><asp:ImageButton ID="ImageButton6" runat="server" 
                   ImageUrl="~/images/nfinanciera.png" Width="100px" onclick="ImageButton6_Click" /></li>
           <li><asp:ImageButton ID="ImageButton5" runat="server" 
                   ImageUrl="~/images/ntributaria.png" Width="100px" onclick="ImageButton5_Click" /></li>
          </ul>  
        </td>
        </tr>
        <tr>
            <td bgcolor="#FFFFFF">
                <h1>Informacion Basica + Rubros</h1>
                <div class="round">
                    <span class="top" ></span></span></span>

                    <div class="contenido">
                    
                    <p>Información del proveedor</p>
                        
                        <br />
                        <table align="center" border="0"  cellspacing="2" width="95%">
                            <tr >
                                <td width="165">Clase de persona:</td>
                                <td class="style1"><asp:DropDownList ID="dllClasPer" runat="server" class="formularios" Width="99%">
                                        <asp:ListItem>-- Seleccionar --</asp:ListItem>
                                    </asp:DropDownList>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td colspan="2">&nbsp;</td>
                                        </td>
                                    </tr>
                            <tr>
                            <td>Tipo de identificación:</td>
                                <td class="style1">
                                    <asp:DropDownList ID="dllTipIden" runat="server" class="formularios" Width="99%"
                                        AutoPostBack="True" onselectedindexchanged="dllTipIden_SelectedIndexChanged">
                                        <asp:ListItem>-- Seleccionar --</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td align="right">
                                            Número de identificación:</td>
                                <td colspan="2" >
                                    <asp:TextBox ID="txtNumIdent" runat="server"   class="formularios"  Width="99%"
                                         Enabled="False" ></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="9" style="text-align: left" >
                                    <asp:RadioButtonList ID="rbTipoNomb" runat="server" 
                                                RepeatDirection="Horizontal" Width="99%" AutoPostBack="True" 
                                                onselectedindexchanged="rbTipoNomb_SelectedIndexChanged">
                                        <asp:ListItem Value="0" Selected="True">Razón social</asp:ListItem>
                                        <asp:ListItem Value="1">Apellidos y Nombres</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="9">
                                    <div ID="oculta1" style="display:block;">
                                        <table border="0" cellpadding="1" cellspacing="1" width="99%" >
                                            <tr runat="server" visible="false" id="Raz_Social">
                                                <td >
                                                            Razón social:</td>
                                                <td>
                                                    <asp:TextBox ID="txtRazSocial" runat="server" class="formularios" Width="99%" MaxLength="80" ></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr runat="server" visible="false" id="Nom_Comercial">
                                                <td width="165">
                                                            Nombre comercial:</td>
                                                <td>
                                                    <asp:TextBox ID="txtNomComercial" runat="server" class="formularios" Width="99%"  
                                                        MaxLength="80" ></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr runat="server" visible="false" id="Apellidos">
                                                <td>
                                                            Apellidos:</td>
                                                <td>
                                                    <asp:TextBox ID="txtApell" runat="server" class="formularios" Width="99%"
                                                        MaxLength="80" ></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr runat="server" visible="false" id="Nombres">
                                                <td width="165">
                                                            Nombres:</td>
                                                <td>
                                                    <asp:TextBox ID="txtNomb" runat="server" class="formularios" Width="99%"
                                                        MaxLength="80" ></asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div ID="oculta2" style="display:none;">
                                        <table border="0" cellpadding="1" cellspacing="1" width="100%">
                                            <tr>
                                                <td width="165">
                                                            Apellidos:</td>
                                                <td>
                                                    <asp:TextBox ID="TextBox3" runat="server" class="formularios"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                            Nombres:</td>
                                                <td>
                                                    <asp:TextBox ID="TextBox4" runat="server" class="formularios"></asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                            Tipo de empresa:</td>
                                <td class="style1">
                                    <asp:DropDownList ID="dllTipEmp" runat="server" class="formularios"  Width="100%"
                                        AutoPostBack="True" onselectedindexchanged="dllTipEmp_SelectedIndexChanged">
                                        <asp:ListItem>-- Seleccionar --</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td colspan="5"><asp:TextBox ID="txtEmpOtros" runat="server" class="formularios" Width="50%"  Visible="false" 
                                  MaxLength="80"></asp:TextBox>
                                </td>
                                
                            </tr>
                            <tr>
                                <td>
                                            Reg. Púb.de inscripción (partida)</td>
                                <td class="style1">
                                    <asp:TextBox ID="txtRegPubInscripPart" runat="server" class="formularios"   Width="99%" MaxLength="20" ></asp:TextBox>
                                </td>
                                <td align="right">
                                            Monto anual de ventas:
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="dllTipMoneda" runat="server"   class="formularios"   Width="180px"
                                                AutoPostBack="True" onselectedindexchanged="dllTipMoneda_SelectedIndexChanged" >
                                                <asp:ListItem>Dolares</asp:ListItem>
                                                <asp:ListItem>Soles</asp:ListItem>
                                            </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtMontAnualVent" runat="server" class="formularios"  Width="99%"
                                     MaxLength="15"></asp:TextBox>

                                </td>
                                <td align="right" class="style2">N°&nbsp;empleados:</td>
                                <td>
                                    <asp:TextBox ID="txtNumEmpl" runat="server" class="formularios"  Width="93%"
                                     MaxLength="4" ></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                            Página web :</td>
                                <td colspan="3">
                                    <asp:TextBox ID="txtPagWeb" runat="server" class="formularios"   Width="300px"
                                     MaxLength="50"  ></asp:TextBox>
                                </td>
                                <td>
                                            &nbsp;</td>
                                <td align="right" class="style2"></td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                 Correo Electrónico :</td>
                                <td colspan="3">

                                    <asp:TextBox ID="txtEmail" runat="server" class="formularios" Width="300px"
                                        MaxLength="40" ></asp:TextBox>

                                </td>
                                <td>
                                            &nbsp;</td>
                                <td align="right" class="style2"></td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </div>

                    <span class="bottom"></span></span></span>
                </div>
                <div class="round">
                    <span class="top"></span>
                    <div class="contenido">
                        <p>Rubros<br /> </p>
                        &nbsp;
                        <asp:GridView ID="GvRubroProveedor" runat="server" CssClass="tablaMain" 
                                    AutoGenerateColumns="False">
                            <Columns>
                                <asp:BoundField DataField="VPRO_COD_RUB_PRO" HeaderText="Codigo" />
                                <asp:BoundField DataField="VPRO_NOM_RUB_PRO" HeaderText="Nombre" />
                                <asp:BoundField DataField="VBAS_NUM_IDENTIFICACION" HeaderText="Ruc" />
                            </Columns>
                        </asp:GridView>
                    </div>
                    <br />
                    <div class="contenido">
                        <p>
                            Rubros Proveedor<br />
                        </p>
                        &nbsp;<p>
                            <asp:Button ID="BtnAgregar" runat="server" class="submitBtn" Height="27px" 
                                onclick="BtnAgregar_Click" Text="Agregar nuevo rubro" Width="206px" />
                        </p>
                        <p>
                        </p>
                        <asp:Label ID="lblError" runat="server" BackColor="#9A5454" BorderStyle="None" 
                            Font-Strikeout="False" ForeColor="White" Visible="False" Width="100%"></asp:Label>
                        <asp:GridView ID="GvgRubro" runat="server" AutoGenerateColumns="False" 
                            CssClass="tablaMain" ShowFooter="True" 
                            onrowdeleting="GvgRubro_RowDeleting" 
                            DataKeyNames="ICOM_ID_RUBRO_COMPRADOR">
                            <Columns>
<%--                                <asp:TemplateField HeaderText="Dni">
                                <ItemTemplate>
                                <%# Eval("VBAS_NUM_IDENTIFICACION") %>
                                </ItemTemplate>
                                <FooterTemplate>
                                <asp:Label ID="lblCodigoRubro" runat="server"></asp:Label>
                                </FooterTemplate>
                                </asp:TemplateField>--%>
                                <asp:BoundField DataField="ICOM_ID_RUBRO_COMPRADOR" HeaderText="Id" 
                                    Visible="False">
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Tipo Rubro"  FooterStyle-HorizontalAlign="Center">
                            <%--<ItemTemplate>
                                <%# Eval("VRUB_CODIGO_RUBRO") %>
                                </ItemTemplate>--%>
                                <ItemTemplate>
                                <%# Eval("VRUB_DESC_RUBRO")%>
                                </ItemTemplate>
                                <FooterTemplate  >
                                <asp:DropDownList ID="ddltiporubro" runat="server" CssClass="formularios"></asp:DropDownList>
                                </FooterTemplate>
                                    <FooterStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Observaciones">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNomRubro" runat="server" 
                                            Text='<%# Eval("VCOM_NOMBRE_TIPO_RUBRO") %>' />
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtGvgNomRubro" runat="server" onkeypress="soloLetras(event)" 
                                            Width="99%" MaxLength="50" onblur="this.value = this.value.toUpperCase()"></asp:TextBox>
                                    </FooterTemplate>
                                    <ItemStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:CommandField HeaderText="Eliminar" ShowDeleteButton="true" 
                                    ItemStyle-HorizontalAlign="Center"  ButtonType="Image"  
                                    DeleteImageUrl="~/images/ico_cancelar.png" >
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:CommandField>
                            </Columns>
                        </asp:GridView>
                    </div>

                    <span class="bottom"></span>
                    <br />
                    <div class="contenido">
                        <p>
                            Key Words<br />
                        </p>
                        &nbsp;<p>
                            <asp:Button ID="btnagregarkeyword" runat="server" class="submitBtn" 
                                Height="27px" Text="Agregar Key Word" Width="206px" 
                                onclick="btnagregarkeyword_Click" />
                        </p>
                        <p>
                        </p>
                        <asp:Label ID="lblerrorkeyword" runat="server" BackColor="#9A5454" BorderStyle="None" 
                            Font-Strikeout="False" ForeColor="White" Visible="False" Width="100%"></asp:Label>

                        <asp:GridView ID="gvKeyWord" runat="server" CssClass="tablaMain" 
                                    AutoGenerateColumns="False"  ShowFooter="True" 
                            onrowdeleting="gvKeyWord_RowDeleting" DataKeyNames="IKEY_ID_KEYWORD">
                            <Columns>
                                <asp:BoundField DataField="IKEY_ID_KEYWORD" HeaderText="Id" Visible="False">
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Nombre">
                                    <ItemTemplate>
                                        <%# Eval("VKEY_NOM_KEYWORD")%>
                                        <%--<asp:Label ID="lblNomRubro" runat="server" Text='<%# Eval("VPRO_NOM_RUB_PRO") %>' />--%>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                     <asp:TextBox ID="txtnombrekeyword" runat="server" Width="99%" MaxLength="50"   onblur="this.value = this.value.toUpperCase()" ></asp:TextBox>
                                    <cc1:FilteredTextBoxExtender ID="FtbeNomRubro" runat="server" 
                                        TargetControlID="txtnombrekeyword" 
                                        ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz1234567890 " >
                                    </cc1:FilteredTextBoxExtender>
                                    </FooterTemplate>
                                    <ItemStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:CommandField ButtonType="Image" DeleteImageUrl="~/images/ico_cancelar.png" 
                                    HeaderText="Eliminar" ShowDeleteButton="True">
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:CommandField>
                            </Columns>
                        </asp:GridView>
                        <br />
                        <div align="left">
                        <table width="100%" >
                        <tr>
                        <td style="width:100px">Observaciones</td>
                        <td>:</td>
                        <td><asp:TextBox ID="txtObservacion" runat="server" TextMode="MultiLine" Width="100%" onblur="this.value = this.value.toUpperCase()"></asp:TextBox></td>
                        </tr>
                        </table>
                       </div>
                        <br />
                        </div>

        <div id="divespera" style="vertical-align:middle;display:none;" align="center" >
          <table>
          <tr>
          <td>Su solicitud se esta procesando ...</td>
          <td>
            <img id="img1" src="../images/ajax-loader.gif" />
          </td>
          </tr>
          </table>
         </div>

                    </div>

        <asp:Panel ID="pnArchivos" runat="server">
        <div class="round">
        <div class="contenido">
        <p>Lista de Archivos Adjuntos</p>
            <asp:GridView ID="gvreportes" runat="server" AutoGenerateColumns="False" CssClass="tablaMain" 
                onrowcommand="gvreportes_RowCommand">

                <Columns>
                    <asp:BoundField DataField="Nombre" HeaderText="Nombre Archivo" />
                    <asp:BoundField DataField="Tipo" HeaderText="Tipo de Archivo" >
                    <ItemStyle Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Fecha" HeaderText="Fecha Registro" >
                    <ItemStyle HorizontalAlign="Center" Width="180px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Descarga">
                      <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lbdescargar" CommandArgument='<%# Eval("Nombre") %>' >Descargar
                          <asp:ImageButton ID="ibdescargar" runat="server"  ImageUrl="~/images/down.gif" CommandArgument='<%#  Eval("Nombre") %>' />
                          
                          </asp:LinkButton>
                      </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>

            </asp:GridView>
         <br />
        </div>
        </div>
         </asp:Panel>
                <div id="divbotones">
                <p align="center">
                    <asp:Button ID="btnAceptar" runat="server" Text="Aceptar" CssClass="btn_acepta"
                        Width="110px" Height="27px" onclick="btnAceptar_Click" OnClientClick="mostrardiv()" />
                      <asp:Button ID="btnRechazar" runat="server" Text="Rechazar"  CssClass="btn_envia" 
                        Width="100px" Height="27px" onclick="btnRechazar_Click" OnClientClick="mostrardiv()" />&nbsp;
                                             
                </p>
                </div>
            </td>
        </tr>
    </table>
<%--    </ContentTemplate>
</asp:UpdatePanel>--%>
 </form>
   
</asp:Content>
